<meta name="csrf-token" content="{{ csrf_token() }}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link type="text/css" rel="stylesheet" href="/css/app22.css">
<script type="text/javascript" src="/js/rem.js"></script>
<link rel="stylesheet" type="text/css" href="/css/swiper.min.css"/>
<script type="text/javascript" src="/js/swiper.min.js"></script>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      </div>
      <div class="modal-body">
        <div class="po-cmt">
            <div class="po-hd">
              <div class="post" style="max-width:200px;max-height:200px;">
                <ul id="img_p"></ul>
              </div>
            </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>

<script type="text/javascript">
    var modal = $('#myModal');
    modal.on("show.bs.modal",function(e){
      $(this).css('display','block');
      var modalHeight=$(window).height() / 2 - $('#myModal .modal-dialog').height() / 2;
            $(this).find('.modal-dialog').css({
                'margin-top': modalHeight
            });
      var btn = $(e.relatedTarget),
      ques_imgs = btn.data('img').split(";");
      //alert(ques_imgs.length);
      for (var i = 0; i < ques_imgs.length; i++) {
        $('#img_p').append('<img class="list-img" src="'+ques_imgs[i]+'" style="height:200px;width:200px;">');
      }
    });
    modal.on("hide.bs.modal",function(e){
      $('#img_p').empty();
    });
</script>